<!--
  @author heguanghua
  @since 2020/05/10 18:18
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head th:include="common/common::jscss"/>
<style>

    .perWidth{
        width: 33.33% !important;
    }
</style>
<body>

<div class="layui-fluid" id="bindSubArea"
     th:with="hasEditSubarea=${#authPermit.checkPermit('/staff/subarea/addEdit.action')}">

    <div class="layui-card">

        <div class="layui-card-body">

            <form method="POST" action="" class="layui-form" lay-filter="zmn-form">

                <input type="hidden" name="staffId" th:value="${staffId}"/>
                <input type="hidden" name="relateId" th:value="${obj.relateId}"/>

                <div class="layui-form-item layui-margin-t">
                    <label class="layui-form-label">是否片区负责人：</label>
                    <div class="layui-input-block">
                        <div class="layui-input-inline">
                            <input type="radio" name="isManager" value="2" title="是"
                                   th:checked="${obj.isManager == 2}">
                            <input type="radio" name="isManager" value="1" title="否"
                                   th:checked="${obj.isManager == 1}">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item layui-margin-t">
                    <div class="item-inline">
                        <label class="layui-form-label" style="width:120px;">所属平台子公司：</label>
                        <div class="inline-box" style="padding-left:150px;width:150px">
                            <div class="inline-box-cc" style="display: -webkit-box">
                                <div class="box-input-inline" style="width: 150px">
                                    <div id="plat"></div>
                                </div>
                                <div class="box-input-inline" style="width: 150px">
                                    <div id="subCompanyId"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item layui-margin-t" style="display: -webkit-box">
                    <label class="layui-form-label" style="width:120px;">所属片区：</label>
                    <select id="subArea" name="subArea" th:value="${obj.subArea}" style="width: 150px" lay-verify="required">
                        <option value="0" th:selected="${0 == obj.subArea}">-选择-</option>
                        <option th:value="${status.key}" th:selected="${status.key == obj.subArea}"
                                th:text="${status.value}" th:each="status:${subAreaOption}">状态
                        </option>
                    </select>
                </div>

                <div class="layui-form-item submit">
                    <div class="layui-input-block" th:if="${hasEditSubarea}">
                        <button class="layui-btn" lay-submit="" lay-filter="zmn-form-submit">保存</button>
                        <button type="reset" lay-submit="" lay-filter="zmn-form-reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </div>

            </form>

        </div>

    </div>

</div>
</body>
</html>

<script type="text/javascript" th:inline="javascript">

    var json = {
        staffId: [[${obj.staffId}]],
        plat: [[${obj.plat}]],
        subCompanyId: [[${obj.subCompanyId}]],
        vo: [[${obj}]],
    };

    layui.extend({
        staff_sub_area: "staff/zmn.staff.sub.area",
    }).use(['index', 'staff_sub_area']);

</script>
